# Define the local folder of where the sources are.
Set USBDDKFldrLocation "USB DDK Location";
If ¬ "{USBDDKFolder}" && "`Exists "{ShellDirectory}{USBDDKFldrLocation}"`" # If the USBDDKFolder var doesn't exist and the file does
Set USBDDKFolder "`Catenate "{ShellDirectory}{USBDDKFldrLocation}"`" # Change the filename and...
Set sources "`Catenate "{ShellDirectory}{USBDDKFldrLocation}"`" # set sources or BBS scripts will have trouble
End
If ¬ "`Exists "{ShellDirectory}{USBDDKFldrLocation}"`" || ¬ "`Exists "{USBDDKFolder}"`" # If the USBDDKFldrLocation location dir file doesn't exist OR # the USBDDKFolder variable has not been set.....
Set NewWindowRect 5,5,100,300; # Create a rect for a window.
Set exit 0;
Set USBDDKTemp "{ShellDirectory}:"; # set a temp directory.
Loop; ∂
# Get the file from the user.
Set USBDDKTemp "`(GetFileName "{ShellDirectory}:" -q -d -b "USBDDK" -m "Where is the 'USBDDK' folder?")≥dev:null`"; ∂
If "{USBDDKTemp}" != ""; # If the file is non-empty
Echo -n "{USBDDKTemp}" > "{ShellDirectory}{USBDDKFldrLocation}"; # Replace the folder name with the new one.
Set USBDDKFolder "{USBDDKTemp}"; # Set the USBDDKFolder to that new location.
Break; # bail
Else;
Echo "## Warning: not creating file “{USBDDKFldrLocation}”."; # else tell the user we are not creating a new file.
Unset USBDDKTemp USBDDKFldrLocation; # unset the temp variable.
Exit 2;
End; ∂
End; ∂
Set exit 1 ;
End;
Unset USBDDKTemp; # Clear the temp variable.
Set USBDDKFolder "`Catenate "{ShellDirectory}{USBDDKFldrLocation}"`" # Set the USBDDKFolder variable from the USBDDKFldrLocation file.
Export USBDDKFolder; # Make this variable visible.
Unset USBDDKFldrLocation; # Clear the USBDDKFldrLocation variable.
Set USBDDKLocalDirectory "{USBDDKFolder}"; # Folder of USBDDK project on local CPU.